import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { HttpModule } from '@angular/http';

import { MyApp } from './app.component';
import { MainTabModule } from '../pages/main-tab/main-tab.module';
import { HomePageModule } from '../pages/main-tab/home/home.module';
import { CatePageModule } from '../pages/main-tab/cate/cate.module';
import { LookModule } from '../pages/main-tab/look/look.module';
import { CartPageModule } from '../pages/main-tab/cart/cart.module';
import { SettingsPageModule } from '../pages/main-tab/settings/settings.module';

import { GoodsService } from '../common/providers/goods-service';
import { LookService } from '../common/providers/look-service';
import { NATIVE_MODULES_PROVIDER, IONIC_ERROR_HANDLER_PROVIDER } from '../common/ionic.providers';

@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    HttpModule,
    BrowserModule,
    MainTabModule,
    HomePageModule,
    CatePageModule,
    LookModule,
    CartPageModule,
    SettingsPageModule,
    IonicModule.forRoot(MyApp, {
      tabsHideOnSubPages: 'true', //隐藏全部子页面tabs
      iconMode: 'ios',
      mode: 'ios',
      modalEnter: 'modal-slide-in',
      modalLeave: 'modal-slide-out',
    }),
  ],
  bootstrap: [ IonicApp ],
  entryComponents: [
    MyApp
  ],
  providers: [
    ...NATIVE_MODULES_PROVIDER,
    IONIC_ERROR_HANDLER_PROVIDER,
    GoodsService,
    LookService,
  ]
})
export class AppModule {}
